package com.aylog.start.controller;

import com.aylog.start.bean.User;
import com.aylog.start.properties.AliyunProperty;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class ControllerTest {

    @Resource
    private User user;

    @RequestMapping("/test")
    public String test() {
        return "Hello SpringBoot";
    }

    @RequestMapping("/user")
    public User getUser() {
        return this.user;
    }

    @Value("${author}")
    private String author;

    @RequestMapping("/author")
    public String author() {
        return this.author;
    }

    @Resource
    private AliyunProperty aliyun;

    @RequestMapping("/aliyun")
    public AliyunProperty aliyun() {
        return this.aliyun;
    }

}
